package org.example.familyterminalms.service;

import lombok.RequiredArgsConstructor;
import org.example.familyterminalms.entity.Model;
import org.example.familyterminalms.mapper.ModelMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class ModelServiceImpl {
    private final ModelMapper modelMapper;

    public void addModel(Model model) {
        modelMapper.insertModel(model);
    }

    public void updateModel(Model model) {
        modelMapper.updateModel(model);
    }

    public void deleteModelById(Long id) {
        modelMapper.deleteModelById(id);
    }

    public Model getModelById(Long id) {
        return modelMapper.getModelById(id);
    }

    public List<Model> getAllModels() {
        return modelMapper.getAllModels();
    }
}
